<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="<?php echo base_url();?>public/img/favicon.ico" type="image/x-icon">
    <link rel="icon" href="<?php echo base_url();?>public/img/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="<?php echo base_url(); ?>public/css/bootstrap.min.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo base_url(); ?>public/css/bootstrap-editable.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo base_url()?>public/css/style_light.css" type="text/css" />
    <link href="<?php echo base_url(); ?>/public/css/global.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo base_url(); ?>/public/css/profilepage.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="<?php echo base_url(); ?>public/css/datepicker.css" type="text/css" />
    <script src="<?php echo base_url(); ?>/public/js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="<?php echo base_url(); ?>/public/js/moment.min.js" type="text/javascript"></script>
    <script src="<?php echo base_url(); ?>/public/js/bootstrap.js" type="text/javascript" ></script>
    <script src="<?php echo base_url(); ?>/public/js/bootstrap-editable.js" type="text/javascript" ></script>
    <script src="<?php echo base_url(); ?>/public/js/bootstrap-datepicker.js" type="text/javascript"></script>
    <script src="<?php echo base_url() ?>/public/js/ttw-notification-menu.min.js" type="text/javascript"></script>
    <script src="<?php echo base_url(); ?>/public/js/global.js" type="text/javascript" ></script>
    <script src="<?php echo base_url(); ?>/public/js/profile.js" type="text/javascript" ></script>

</head>
<body>
<div class="container">
    <div class="header">
        <a href="<?php echo base_url(); ?>index.php">
            <img id='searchlogo' src='<?php echo base_url();?>public/img/TicForTac_Logo.png'/>
        </a>
        <div class="btn-group buttonBox">
            <a data-toggle="dropdown" aria-expanded="false" class="btn dropdown-toggle">Inbox <span class="badge"><?php echo count($messages)?></span></a>
            
            <?php if(count($messages) >0){ ?>
                <ul class="dropdown-menu" role="menu">
                    <?php foreach( $messages as $m ){ ?>
                    <li><a href="#"><?php echo $m->MSG_SUBJ?></a></li>
                    <?php }?>
                </ul>
            <?php }?>
            <a class="btn btn-info">ABOUT</a>
            <a class="btn btn-danger" href="profile/signout" >LOG OUT</a>

        </div>
    </div>
    <div class="clear"></div>
    <div class="row">
        <div class="col-md-1 profileBar">
           
                <div class="profileBox row">
                    <div class="col-md-6">
                        <img id="profileImage" class="left" src='<?php echo base_url();?>public/img/userplaceholder.png'/>
						
                    </div>
                    <div class="userName col-md-6">        
                        <span><?php echo $user->FST_NAME ?> <?php echo $user->LAST_NAME ?></span>
                    </div>

                        <hr />
                </div>
            
                <ul class="list-group userOptions">
                   
                    <li class="list-group-item detailUserOptions">Skill Trades</li>
                 
                </ul>
            
            <div class="clear"></div>
        </div>
        <div class="col-md-9">
            <div class="profileDetail row">
                <div class="profileAbout row">
                    
                    <div class="col-md-8">
                      <div class="col-md-2 profile_container">
                        <div class="fileupload-preview thumbnail" ></div>
                        <div class="col-md-10">
                        <table class="table editable_table" id="add_row">
                            <tr>
                                <td>First Name:</td>
                                <td class="editable_field">
                                    <a href="#" data-type="text" data-name="FST_NAME" data-table="user_login" data-original-title="Enter firstname" class="editable_link">
                                        <?php echo $user->FST_NAME;?>
                                    </a>
                                </td>

                            </tr>
                              <tr>
                                <td>Last Name:</td>
                                <td class="editable_field">
                                    <a href="#" data-type="text" data-name="LAST_NAME" data-table="user_login" data-original-title="Enter lastname" class="editable_link">
                                        <?php echo $user->LAST_NAME ?>
                                    </a>
                                </td>

                            </tr>
                            <tr>
                                <td>Lives in:</td>
                                <td class="editable_field">
                                    <a href="#" data-type="text" data-name="LIVE_IN" data-table="user_login" data-original-title="Enter Live in" class="editable_link">
                                    <?php echo $user->LIVE_IN ?>
                                    </a></td>
                            </tr>
                            <tr>
                                <td>From:</td>
                                <td class="editable_field">
                                    <a href="#" data-type="text" data-name="USER_FROM" data-table="user_login" data-original-title="Enter Live in" class="editable_link">
                                    <?php echo $user->USER_FROM ?>
                                    </a>
                                </td>
                            </tr>
                        </table>
                        </div>

                    </div>
                </div>
            </div>
            <div class="clear"></div>

            <div class="userEducation">
                <ul class="list-unstyled heading">
                    <li>Education <img data-toggle="modal" data-target="#education_model" class="add_icon" src="<?php echo base_url()?>public/img/add.png" >
                    </li>
                </ul>
                <table class="editable_table table table-hover profile_table">
                    <thead>
                    <tr>
                        <th class="detailBorder">School</th>
                        <th class="detailBorder">Degree</th>
                        <th class="detailBorder">Major</th>
                        <th></th>
                    </tr>
                    </thead>
                    <?php if(count($educations)>0){?>
                        <?php foreach($educations as $single){ ?>
                            <tr>
                                <td class="editable_field"><a href="#" data-type="select" data-pk="<?php echo $single->id?>" data-name="SCHOOL_ID" data-source="ajaxhandler/getallschools" data-table="user_education"  data-original-title="Enter School" class="selectable_link"><?php echo $single->SCHOOL_NAME ?></a></td>
                                <td class="editable_field"><a href="#" data-type="select" data-pk="<?php echo $single->id?>" data-name="DEGREE_ID" data-source="ajaxhandler/getalldegree" data-table="user_education" data-original-title="Enter degree" class="selectable_link">
                                    <?php echo $single->DEGREE_NAME?></a></td>
                                <td class="editable_field"><a href="#" data-type="select" data-pk="<?php echo $single->id?>" data-name="MAJOR_ID" data-source="ajaxhandler/getallmajors" data-table="user_education" data-original-title="Enter major" class="selectable_link"><?php echo $single->MAJOR_NAME?></a></td>
                                <td><img data-table="user_education" data-pk="<?php echo $single->id ?>" class="clear_icon" src="<?php echo base_url()?>public/img/clear.png" /></td>
                            </tr>
                       <?php }?>
                    <?php }?>
            

                </table>
            </div>

            <div class="userSkills">
                <ul class="list-unstyled heading">
                    <li>Skills <img data-toggle="modal" data-target="#skills_model" class="add_icon" src="<?php echo base_url()?>public/img/add.png" ></li>
                </ul>
               
                <table class="editable_table table table-hover userskills_table">
                    <thead>
                    <tr>
                        <th class="detailBorder">Skill</th> 
                        <th class="detailBorder">Comment</th>
                        <th class="detailBorder">Proficiency</th>
                        <th></th>
                    </tr>
                    </thead>
                           <?php if(count($skills)>0){?>
                        <?php foreach($skills as $single){ ?>
                            <tr>
                                <td class="editable_field"><a data-source="ajaxhandler/getallskills" href="#" data-type="select" data-pk="<?php echo $single->id ?>" data-table="skills" data-name="SKILL_ID" data-original-title="Enter skill name" class="selectable_link"><?php echo $single->SKILL_NAME ?></a></td>
                                <td class="editable_field"><a href="#" data-type="textarea" data-pk="<?php echo $single->id ?>" data-table="skills" data-name="COMMENT" data-original-title="Enter skill comment" class="selectable_link"><?php echo $single->COMMENTS?></a></td>
                                <td class="editable_field"><a href="#" data-source="ajaxhandler/getproficiency"  data-type="select" data-pk="<?php echo $single->id ?>" data-table="skills" data-name="SKILL_PROF" data-original-title="Select skill proficiency" class="selectable_link"><?php echo $single->SKILL_PROF?></a></td>
                                <td><img data-table="skills" data-pk="<?php echo $single->id ?>" class="clear_icon" src="<?php echo base_url()?>public/img/clear.png" /></td>
                            </tr>
                       <?php }?>
                    <?php }?>

                  
            </table>
            </div>

            <div class="userCertificates">
                <ul class="list-unstyled heading">
                    <li>Certificates <img data-toggle="modal" data-target="#certificates_model" class="add_icon" src="<?php echo base_url()?>public/img/add.png" >
					</li>
                </ul>
                <table class="editable_table table table-hover certificate_table">
                    <thead>
                    <tr>
                    <th class="detailBorder">Certificate</th>
                    <th class="detailBorder">Date Acquired</th>
                    <th></th>
                    </tr>
                    </thead>
                    <?php if(count($certificates)){ ?>
                        <?php foreach($certificates as $single){?>
                            <tr>        
                                <td class="editable_field"><a data-source="ajaxhandler/getallcertificates" href="#" data-table="user_certificates" data-pk="<?php echo $single->id ?>" data-type="select" data-name="CERTIFICATE_ID" data-original-title="Enter certificate" class="selectable_link"><?php echo $single->CERTIFICATES_NAME ?></a></td>
                                <td class="editable_field"><a href="#" data-type="combodate" data-name="ACQUIRED_DATE" data-table="user_certificates" data-pk="<?php echo $single->id ?>" data-original-title="Enter Acquired Date" class="date_link"><?php echo date('m/d/Y', strtotime($single->ACQUIRED_DATE))  ?></a></td>
                                <td><img data-table="user_certificates" data-pk="<?php echo $single->id ?>" class="clear_icon" src="<?php echo base_url()?>public/img/clear.png" /></td>
                            </tr>
                        <?php }?>
                    <?php }?>
                </table>
            </div>
        </div>
    </div>
 </div>
    <?php include "profile_modals.php" ?>
    
    
    
    
</body>
</html>